package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //发布动态
    String publish(Movement movement);

    //根据用户id 查询动态
    PageResult findByUserId(Long userId, Integer page, Integer pagesize);

    //查询好友动态
    List<Movement> findFriendMovements(Long userId, Integer page, Integer pagesize);

    //随机查询推荐动态
    List<Movement> randomMovements(Integer counts);

    //获取推荐动态
    List<Movement> findMovementsByPids(List<Long> pids);

    //根据id查询动态
    Movement findById(String movementId);

    //根据用户id 查询动态分页列表
    PageResult findByUserId(Long uid, Integer state, Integer page, Integer pagesize);

    //更新动态状态
    void update(String movementId, Integer state);
}
